//
//  NoneDevView.m
//  iOS 雷达动画
//
//  Created by 谭亚明 on 2020/6/19.
//  Copyright © 2020 GloryMan. All rights reserved.
//

#import "NoneDevView.h"
#import "UIButton+Gradient.h"
@implementation NoneDevView

-(void)awakeFromNib{
    [super awakeFromNib];
    self.helpBtn.layer.borderColor = rgba(151, 151, 151).CGColor;
    [self.againBtn gradientButtonWithSize:self.againBtn.frame.size colorArray:@[(id)rgba(139, 175, 255),(id)rgba(76, 132, 255)] percentageArray:@[@(0.5),@(1)] gradientType:GradientFromLeftTopToRightBottom];
    self.againBtn.layer.masksToBounds = YES;
    self.againBtn.layer.cornerRadius = 5;
    
}


-(void)showNoneViewWithTop:(CGFloat)topValue{
    [UIView animateWithDuration:1 animations:^{
        self.frame = CGRectMake(0, topValue, [UIScreen mainScreen].bounds.size.width, 250);
    }];
}

-(void)hidNoneView{
    [UIView animateWithDuration:1 animations:^{
        self.frame = CGRectMake(0, [UIScreen mainScreen].bounds.size.height, 414, 414);
    }];
}

-(IBAction)seeHlelAction:(id)sender{
   if (self.seleActionBlock) {
       self.seleActionBlock(0);
   }
}

-(IBAction)scanAgainAction:(id)sender{
    [self hidNoneView];
    
    if (self.seleActionBlock) {
        self.seleActionBlock(1);
    }
}

-(void)dealloc{
    NSLog(@"+++++++++++++没有搜索到设备试图释放");
}

/*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.
 - (void)drawRect:(CGRect)rect {
 // Drawing code
 }
 */

@end
